//装饰器
//类的成员属性的装饰器 2个形参
function F2(target,field){//目标
    console.log('F2...')
    target[field] = 'Tom'  //访问属性：对象.属性名   对象[属性名]
   
}
//类的成员方法的装饰器 2个形参
function F3(target,field){
    console.log('F3...',field)//修饰的类的方法名
}
//类的成员方法的形参的装饰器 3个形参
function F4(target,field,idex){
    console.log('F4...',target,field,idex)
}
class Emp{
    @F2 ename:string
    @F3 work(n1:number,@F4 n2:number){
        console.log('work...')
    }
}
//实例化对象
let e1:any = new Emp() 
console.log(e1.ename) 
e1.work()